extends Timer

signal infoAI
signal AIAttack
var total = 10

func _ready():
	connect("infoAI",get_tree().current_scene.get_node("info"),"_set_text",["AI回合"])
	connect("AIAttack",get_tree().current_scene.get_node("enemy"),"_attack")

func _on_Timer_timeout():
	$Label.text = str(total)
	if total > 0:
		total -= 1
	elif total == 0:
		emit_signal("infoAI")
		emit_signal("AIAttack")
		total = 10
	pass

func _on_player():
	total = 10
